      subroutine Initialization
      use global
      Implicit none
	  integer :: i,nelt,mid
	  nelt=nnt-1
      
      do i=1,nnt
	    x(i)=(i-1)*L/nelt
      enddo
	  vcor=x

      !do i=1,nnt
	  !  write(*,*)vcor_n(i)
      !enddo
	  
	  !!! Initialize Pressure, Density, Velocity at the Left of the chamber
	  mid=nnt/2
	  do i=1,mid
	    Pres(i) =Pres_L
		Rho(i) =Rho_L
		V(i)    =V_L
	  enddo
	  !!! Initialize Pressure, Density, Velocity at the Right of the chamber
	  do i=mid+1,nnt
	    Pres(i) =Pres_R
		Rho(i) =Rho_R
		V(i)    =V_R
	  enddo
	  !!! Initialize the speed of sound
	  do i=1,nnt
	    V_sound(i)=Sqrt(gam*Pres(i)/Rho(i))
	  enddo
	  
	  !!! Initialize the Solution matrix
	  Do i=1,nnt
		U(i,1)=Rho(i)
		U(i,2)=Rho(i)*V(i)
		U(i,3)=Pres(i)/(gam-1)+0.5D0*Rho(i)*V(i)*V(i)
	  enddo
	  
	  !do i=1,nnt
	  !  write(*,*)U(i,1),U(i,2),U(i,3)
      !enddo
	  !
      end subroutine